import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import path from 'path' // 引入node中的path
export default defineConfig({
  plugins: [
    react(),
  ],
  resolve:{
     alias:{
       "@":path.resolve(__dirname,'./src')
     }
   }
   
})



// 自动生成 预打包
// import OptimizationPersist from "vite-plugin-optimize-persist";
// import PkgConfig from "vite-plugin-package-config";

// export default ({ mode }) => {
//    plugins: [
//       vue(),
//       //自动生成 预打包
//       PkgConfig(),
//       OptimizationPersist(),
      
//       AutoImport({
//         resolvers: [ElementPlusResolver()],
//       }),
//       Components({
//         resolvers: [ElementPlusResolver()],
//       }),
//     ],
//      optimizeDeps: {
//       include: [
//         "element-plus/es",
//         "element-plus/es/components/config-provider/style/css",
//         "element-plus/es/components/container/style/css",
//         "element-plus/es/components/main/style/css",
//         "element-plus/es/components/header/style/css",
//         "element-plus/es/components/date-picker/style/css",
//         "element-plus/es/components/drawer/style/css",
//         "element-plus/es/components/image/style/css",
//         "element-plus/es/components/image/style/css",
//         "element-plus/es/components/table/style/css",
//         "element-plus/es/components/table-column/style/css",
//         "element-plus/es/components/input/style/css",
//         "element-plus/es/components/dropdown/style/css",
//         "element-plus/es/components/popover/style/css",
//         "element-plus/es/components/dropdown-item/style/css",
//         "element-plus/es/components/dropdown-menu/style/css",
//         "element-plus/es/components/pagination/style/css",
//         "element-plus/es/components/scrollbar/style/css",
//         "element-plus/es/components/dialog/style/css",
//         "element-plus/es/components/loading/style/css",
//         "element-plus/es/components/tabs/style/css",
//         "element-plus/es/components/tab-pane/style/css",
//         "element-plus/es/components/select/style/css",
//         "element-plus/es/components/option/style/css",
//         "vue",
//         "pinia",
//         "jquery",
//         "sass",
//         "vue-router",
//         // "tailwindcss",
//         "tailwindcss/plugin",
//       ],
//     },
// }
